import Layout from '@/layout';
// // 由于懒加载页面太多的话会造成webpack热更新太慢，所以开发环境不使用懒加载，只有生产环境使用懒加载
const _import = require('@/utils/util.import');
const meta = { auth: true, menuId: '/marketingManager' };
export default {
  path: '/marketingManager',
  meta: {
    ...meta,
    icon: 'setting',
    title: '营销管理',
  },
  component: Layout,
  children: ((basePath) => [
    {
      path: `${basePath}/marketingPointManager`,
      name: 'marketingPointManager',
      component: _import('marketingManager/marketingPointManager'),
      meta: {
        ...meta,
        title: '营销指引管理',
      },
    },
    {
      path: `${basePath}/marketingPointManager/marketingPointDetail`,
      name: 'marketingPointDetail',
      component: _import('marketingManager/marketingPointManager/marketingPointDetail'),
      meta: {
        ...meta,
        title: '营销指引详情',
      },
    },
    {
      path: `${basePath}/marketingPointManager/marketingPointEdit`,
      name: 'marketingPointEdit',
      component: _import('marketingManager/marketingPointManager/marketingPointEdit'),
      meta: {
        ...meta,
        title: '营销指引编辑',
      },
    },
    {
      path: `${basePath}/marketingActivityQuery`,
      name: 'marketingPointEdit',
      component: _import('marketingManager/marketingActivityQuery'),
      meta: {
        ...meta,
        title: '营销活动查询',
      },
    },
    {
      path: `${basePath}/marketingActivityQuery/marketingActivityDetail`,
      name: 'marketingPointEdit',
      component: _import('marketingManager/marketingActivityQuery/marketingActivityDetail'),
      meta: {
        ...meta,
        title: '营销活动查询详情',
      },
    },
    {
      path: `${basePath}/myTask`,
      name: 'myTask',
      component: _import('marketingManager/myTask'),
      meta: {
        ...meta,
        title: '我的任务',
      },
    },
    {
      path: `${basePath}/myTask/taskDetail`,
      name: 'myTask',
      component: _import('marketingManager/myTask/taskDetail'),
      meta: {
        ...meta,
        title: '任务详情',
      },
    },
    {
      path: `${basePath}/myTask/customTelephoning`,
      name: 'myTask',
      component: _import('marketingManager/myTask/customTelephoning'),
      meta: {
        ...meta,
        title: '客户电话沟通',
      },
    },
    {
      path: `${basePath}/myTask/offlineContactRegistration`,
      name: 'myTask',
      component: _import('marketingManager/myTask/offlineContactRegistration'),
      meta: {
        ...meta,
        title: '线下接触登记',
      },
    },
    {
      path: `${basePath}/myTask/textMessageSend`,
      name: 'myTask',
      component: _import('marketingManager/myTask/textMessageSend'),
      meta: {
        ...meta,
        title: '短信发送',
      },
    },
  ])('/marketingManager'),
};
